import {reactive} from "./reactive/reactive";
import {effect} from "./reactive/effect";
import {ref} from "./reactive/ref";

//const observed = (window.observed = reactive({
//    count: 0,
//    age : 22
//}));
//
//effect(() => {
//    console.log('observed.count is:', observed.count);
//});

//const arr = window.arr = reactive([1, 2, 3]);
//
//effect(()=>{
//    console.log('数组改变:', arr[3]);
//})
//effect(()=>{
//    console.log('长度改变:', arr.length);
//})

const foo = ref(1);
effect(()=>{
    console.log('ref foo 的值为:', foo.value);
})
foo.value++;